home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch8i < prev    next >
Encoding:
Text File  |  1990-06-08  |  58.9 KB  |  2,397 lines

  1. Path: uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!uw-beaver!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v10i027:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch8i
  5. Message-ID: <5735@tekred.CNA.TEK.COM>
  6. Date: 5 Jun 90 17:55:30 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2386
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 10, Issue 27
  13. Archive-name: NetHack3/Patch8i
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 9 (of 24)."
  25. # Contents:  others/splitf.c patch8.03
  26. # Wrapped by billr@saab on Mon Jun  4 15:27:20 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'others/splitf.c' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'others/splitf.c'\"
  30. else
  31. echo shar: Extracting \"'others/splitf.c'\" \(4920 characters\)
  32. sed "s/^X//" >'others/splitf.c' <<'END_OF_FILE'
  33. X/******************************************************************************
  34. X*                                          *
  35. X*            File Splitter and Re-assembler                  *
  36. X*                                          *
  37. X*            by Pierre Martineau, 90/05/20                  *
  38. X*                                          *
  39. X*                 Version 1.1                      *
  40. X*                                          *
  41. X*             Placed in the public domain                  *
  42. X*                                          *
  43. X******************************************************************************/
  44. X
  45. X#include <sys\types.h>
  46. X#include <sys\stat.h>
  47. X#include <string.h>
  48. X#include <stdlib.h>
  49. X#include <stdio.h>
  50. X#include <math.h>
  51. X
  52. XFILE *infile, *outfile;
  53. Xchar fname[16];
  54. Xchar chunk_name[16];
  55. Xint extent = 0;
  56. Xlong hunk_size;
  57. Xunsigned buflen = 0x8000;
  58. Xchar *buf = 0;
  59. X
  60. Xmain(argc, argv)
  61. Xint argc;
  62. Xchar *argv[];
  63. X{
  64. Xstruct stat stat_buf;
  65. Xchar *cptr;
  66. X
  67. X    printf("File Splitter and Re-assembler V1.1, by Pierre Martineau, 90/05/20.\n");
  68. X    printf("This program is public domain and may be freely distributed.\n");
  69. X    if ((argc < 2) || (argc > 3)) {
  70. X    printf("\nUsage: splitf file_to_split [chunk_size]\n");
  71. X    printf("       If chunk_size isn't specified, the file will be split\n");
  72. X    printf("       into two files of (approximately) equal size.\n\n");
  73. X    printf("       splitf dest_file /r\n");
  74. X    printf("       /r will re-assemble the parts back into the whole\n");
  75. X    printf("       specified by dest_file.\n");
  76. X    return;
  77. X    }
  78. X
  79. X/*  Extract filename from first argumemt  */
  80. X
  81. X    if ((cptr = strrchr(argv[1], '\\')) == NULL)
  82. X    cptr = argv[1];
  83. X    else
  84. X    cptr++;
  85. X    strcpy(fname, cptr);
  86. X    if ((cptr = strchr(fname, '.')) != NULL)
  87. X    *++cptr = '\000';
  88. X    else
  89. X    strcat(fname, ".");
  90. X
  91. X    if ((argc == 3) && ((strcmpi(argv[2], "-r") == 0) || (strcmpi(argv[2], "/r") == 0))) {
  92. X    getbuf();
  93. X    printf("\nRe-assembling %s ...\n\n", argv[1]);
  94. X    copy_hunks(argv[1]);
  95. X    fclose(outfile);
  96. X    freebuf();
  97. X    printf("\nDone.\n");
  98. X    }
  99. X    else {
  100. X    getbuf();
  101. X    if ((infile = fopen(argv[1], "rb")) == NULL) {
  102. X        printf("\nCouldn't open input file!\n");
  103. X        return;
  104. X    }
  105. X    if (stat(argv[1], &stat_buf) != 0) {
  106. X        printf("\nBad file handle!\n");
  107. X        return;
  108. X    }
  109. X    if (argc == 3)
  110. X        hunk_size = atol(argv[2]);
  111. X    else
  112. X        hunk_size = (stat_buf.st_size / 2) + 1;
  113. X    if (hunk_size < 1) {
  114. X        printf("\nInvalid chunk size!\n");
  115. X        return;
  116. X    }
  117. X    printf("\nSplitting %s ...\n\n", argv[1]);
  118. X    write_hunks();
  119. X    fclose(infile);
  120. X    freebuf();
  121. X    printf("\nDone.\n");
  122. X    }
  123. X}
  124. X
  125. Xwrite_hunks()
  126. X{
  127. Xlong size;
  128. Xunsigned bufsize;
  129. Xunsigned numread;
  130. X
  131. X    for (;;) {
  132. X    if(!next_file()) {
  133. X        printf("Too many files, please specify a chunk size that\n");
  134. X        printf("will result in fewer than 1000 output files!\n");
  135. X        return;
  136. X    }
  137. X    if ((outfile = fopen(chunk_name, "wb")) == NULL) {
  138. X        printf("Unable to create output file %s\n", chunk_name);
  139. X        return;
  140. X    }
  141. X    size = hunk_size;
  142. X    numread = 1;
  143. X    while(size > 0 && numread /* Work around TC idiot-syncracy */) {
  144. X        bufsize = size < buflen ? size : buflen;
  145. X        numread = fread(buf, sizeof(char), bufsize, infile);
  146. X        if (ferror(infile)) {
  147. X        printf("Error while reading input file %s\n", chunk_name);
  148. X        fclose(outfile);
  149. X        return;
  150. X        }
  151. X        fwrite(buf, sizeof(char), numread, outfile);
  152. X        if (ferror(outfile)) {
  153. X        printf("Error while writing output file!\n");
  154. X        fclose(outfile);
  155. X        return;
  156. X        }
  157. X        size -= numread;
  158. X        if (numread != bufsize) {
  159. X        printf("    Writing %ld bytes to %s\n", hunk_size-size, chunk_name);
  160. X        fclose(outfile);
  161. X        return;
  162. X        }
  163. X    }
  164. X    fclose(outfile);
  165. X    printf("    Writing %ld bytes to %s\n", hunk_size-size, chunk_name);
  166. X    }
  167. X}
  168. X
  169. Xcopy_hunks(filename)
  170. Xchar *filename;
  171. X{
  172. Xunsigned numread;
  173. X
  174. X    if(!next_file())
  175. X    return;
  176. X    if ((infile = fopen(chunk_name, "rb")) == NULL) {
  177. X    printf("Nothing to do!\n");
  178. X    return;
  179. X    }
  180. X    if ((outfile = fopen(filename, "wb")) == NULL) {
  181. X    printf("Couldn't open output file!\n");
  182. X    return;
  183. X    }
  184. X    for (;;) {
  185. X    numread = 1;
  186. X    while(!feof(infile) && numread /* Avoid TC problem */) {
  187. X        numread = fread(buf, sizeof(char), buflen, infile);
  188. X        if (ferror(infile)) {
  189. X        printf("Error while reading input file %s\n", chunk_name);
  190. X        fclose(infile);
  191. X        return;
  192. X        }
  193. X        fwrite(buf, sizeof(char), numread, outfile);
  194. X        if (ferror(outfile)) {
  195. X        printf("Error while writing output file!\n");
  196. X        fclose(infile);
  197. X        return;
  198. X        }
  199. X    }
  200. X    printf("    Copying file %s to output file.\n", chunk_name);
  201. X    fclose(infile);
  202. X    if(!next_file())
  203. X        return;
  204. X    if ((infile = fopen(chunk_name, "rb")) == NULL)
  205. X        return;
  206. X        
  207. X    }
  208. X}
  209. X
  210. Xnext_file()
  211. X{
  212. Xchar num[4];
  213. X
  214. X    if (extent > 999)
  215. X    return(0);
  216. X    strcpy(chunk_name, fname);
  217. X    itoa(extent,num, 10);
  218. X    if (strlen(num) == 1) {
  219. X    strcat(chunk_name, "00");
  220. X    strcat(chunk_name, num);
  221. X    }
  222. X    else if (strlen(num) == 2) {
  223. X    strcat(chunk_name, "0");
  224. X    strcat(chunk_name, num);
  225. X    }
  226. X    else
  227. X    strcat(chunk_name, num);
  228. X    ++extent;
  229. X    return(-1);
  230. X}
  231. X
  232. Xgetbuf()
  233. X{
  234. X    while (buflen >= 256 && !(buf = malloc(buflen)))
  235. X    buflen >>= 1;
  236. X    if (!buf) {
  237. X    printf("\nCan't allocate an adequate copy buffer.\n");
  238. X    exit(2);
  239. X    }
  240. X}
  241. X
  242. Xfreebuf()
  243. X{
  244. X    free(buf);
  245. X}
  246. X
  247. END_OF_FILE
  248. if test 4920 -ne `wc -c <'others/splitf.c'`; then
  249.     echo shar: \"'others/splitf.c'\" unpacked with wrong size!
  250. fi
  251. # end of 'others/splitf.c'
  252. fi
  253. if test -f 'patch8.03' -a "${1}" != "-c" ; then 
  254.   echo shar: Will not clobber existing file \"'patch8.03'\"
  255. else
  256. echo shar: Extracting \"'patch8.03'\" \(50662 characters\)
  257. sed "s/^X//" >'patch8.03' <<'END_OF_FILE'
  258. X*** src/Old/end.c    Sun Jun  3 12:57:03 1990
  259. X--- src/end.c    Thu May 31 22:12:57 1990
  260. X***************
  261. X*** 14,28 ****
  262. X  #include "eshk.h"
  263. X  
  264. X  void NDECL(end_box_display);
  265. X! static int NDECL(done_intr);
  266. X  
  267. X! static const char *deaths[] = {        /* the array of death */
  268. X      "died", "choked", "poisoned", "starvation", "drowning",
  269. X      "burning", "crushed", "turned to stone", "genocided",
  270. X      "panic", "trickery",
  271. X      "quit", "escaped", "ascended" };
  272. X  
  273. X! static const char *ends[] = {        /* "when you..." */
  274. X      "died", "choked", "were poisoned", "starved", "drowned",
  275. X      "burned", "were crushed", "turned to stone", "were genocided",
  276. X      "panicked", "were tricked",
  277. X--- 14,29 ----
  278. X  #include "eshk.h"
  279. X  
  280. X  void NDECL(end_box_display);
  281. X! STATIC_PTR int NDECL(done_intr);
  282. X! static void FDECL(disclose,(int,BOOLEAN_P));
  283. X  
  284. X! static const char NEARDATA *deaths[] = {        /* the array of death */
  285. X      "died", "choked", "poisoned", "starvation", "drowning",
  286. X      "burning", "crushed", "turned to stone", "genocided",
  287. X      "panic", "trickery",
  288. X      "quit", "escaped", "ascended" };
  289. X  
  290. X! static const char NEARDATA *ends[] = {        /* "when you..." */
  291. X      "died", "choked", "were poisoned", "starved", "drowned",
  292. X      "burned", "were crushed", "turned to stone", "were genocided",
  293. X      "panicked", "were tricked",
  294. X***************
  295. X*** 99,105 ****
  296. X      return 0;
  297. X  }
  298. X  
  299. X! static
  300. X  int
  301. X  done_intr(){
  302. X      done_stopprint++;
  303. X--- 100,106 ----
  304. X      return 0;
  305. X  }
  306. X  
  307. X! STATIC_PTR
  308. X  int
  309. X  done_intr(){
  310. X      done_stopprint++;
  311. X***************
  312. X*** 240,255 ****
  313. X      done(PANICKED);
  314. X  }
  315. X  
  316. X! /* Be careful not to call panic from here! */
  317. X! void
  318. X! done(how)
  319. X  int how;
  320. X  {
  321. X  #ifdef MACOS
  322. X      int see_c;
  323. X      char mac_buf[80];
  324. X  #endif
  325. X      struct permonst *upmon;
  326. X      char kilbuf[BUFSZ], buf2[BUFSZ];
  327. X      /* kilbuf: used to copy killer in case it comes from something like
  328. X       *    xname(), which would otherwise get overwritten when we call
  329. X--- 241,325 ----
  330. X      done(PANICKED);
  331. X  }
  332. X  
  333. X! static void
  334. X! disclose(how,taken)
  335. X  int how;
  336. X+ boolean taken;
  337. X  {
  338. X  #ifdef MACOS
  339. X      int see_c;
  340. X      char mac_buf[80];
  341. X  #endif
  342. X+     char    c;
  343. X+ 
  344. X+     if(invent) {
  345. X+ #ifndef MACOS
  346. X+         if(taken)
  347. X+         pline("Do you want to see what you had when you %s? ",
  348. X+             (how == QUIT) ? "quit" : "died");
  349. X+         else
  350. X+         pline("Do you want your possessions identified? ");
  351. X+         if ((c = yn_function(ynqchars,'y')) == 'y') {
  352. X+ #else
  353. X+         {
  354. X+             extern short macflags;
  355. X+         
  356. X+             /* stop user from using menus, etc. */
  357. X+             macflags &= ~(fDoNonKeyEvt | fDoUpdate);
  358. X+         }
  359. X+         if(taken)
  360. X+         Sprintf(mac_buf, "Do you want to see what you had when you %s? ",
  361. X+             (how == QUIT) ? "quit" : "died");
  362. X+         else
  363. X+         Sprintf(mac_buf, "Do you want your possessions identified? ");
  364. X+         if(!flags.silent) SysBeep(1);
  365. X+         if ((c = "qqynq"[UseMacAlertText(129,mac_buf)+1]) == 'y') {
  366. X+ #endif
  367. X+         /* New dump format by maartenj@cs.vu.nl */
  368. X+         struct obj *obj;
  369. X+ 
  370. X+         for(obj = invent; obj && !done_stopprint; obj = obj->nobj) {
  371. X+             makeknown(obj->otyp);
  372. X+             obj->known = obj->bknown = obj->dknown = 1;
  373. X+         }
  374. X+         doinv(NULL);
  375. X+         end_box_display();
  376. X+         }
  377. X+         if (c == 'q')  done_stopprint++;
  378. X+         if (taken) {
  379. X+         /* paybill has already given the inventory locations 
  380. X+          * in the shop and put it on the main object list
  381. X+          */
  382. X+         struct obj *obj;
  383. X+ 
  384. X+         for(obj = invent; obj; obj = obj->nobj) {
  385. X+             obj->owornmask = 0;
  386. X+             if(rn2(5)) curse(obj);
  387. X+         }
  388. X+             invent = (struct obj *) 0;
  389. X+         }
  390. X+     }
  391. X+ 
  392. X+     if (!done_stopprint) {
  393. X+ #ifdef MACOS
  394. X+         c = "qqynq"[UseMacAlertText(129, "Do you want to see your instrinsics ?")+1];
  395. X+ #else
  396. X+         pline("Do you want to see your intrinsics? ");
  397. X+         c = yn_function(ynqchars, 'y');
  398. X+ #endif
  399. X+         if (c == 'y') enlightenment();
  400. X+         if (c == 'q') done_stopprint++;
  401. X+     }
  402. X+ 
  403. X+ }
  404. X+ 
  405. X+ /* Be careful not to call panic from here! */
  406. X+ void
  407. X+ done(how)
  408. X+ int how;
  409. X+ {
  410. X      struct permonst *upmon;
  411. X+     boolean taken;
  412. X      char kilbuf[BUFSZ], buf2[BUFSZ];
  413. X      /* kilbuf: used to copy killer in case it comes from something like
  414. X       *    xname(), which would otherwise get overwritten when we call
  415. X***************
  416. X*** 256,263 ****
  417. X       *    xname() when listing possessions
  418. X       * buf2: same as player name, except it is capitalized
  419. X       */
  420. X-     char    c;
  421. X-     boolean taken;
  422. X  #ifdef ENDGAME
  423. X      if (how == ASCENDED)
  424. X          killer_format = NO_KILLER_PREFIX;
  425. X--- 326,331 ----
  426. X***************
  427. X*** 346,415 ****
  428. X              Strcpy(kilbuf, "quit while already on Charon's boat");
  429. X          }
  430. X      }
  431. X!     if (how == ESCAPED) killer_format = NO_KILLER_PREFIX;
  432. X      taken = paybill();
  433. X      paygd();
  434. X      clearlocks();
  435. X      if(flags.toplin == 1) more();
  436. X  
  437. X!     if(invent) {
  438. X! #ifndef MACOS
  439. X!         if(taken)
  440. X!         pline("Do you want to see what you had when you %s? ",
  441. X!             (how == QUIT) ? "quit" : "died");
  442. X!         else
  443. X!         pline("Do you want your possessions identified? ");
  444. X!         if ((c = yn_function(ynqchars,'y')) == 'y') {
  445. X! #else
  446. X!         {
  447. X!             extern short macflags;
  448. X!         
  449. X!             /* stop user from using menus, etc. */
  450. X!             macflags &= ~(fDoNonKeyEvt | fDoUpdate);
  451. X!         }
  452. X!         if(taken)
  453. X!         sprintf(mac_buf, "Do you want to see what you had when you %s? ",
  454. X!             (how == QUIT) ? "quit" : "died");
  455. X!         else
  456. X!         sprintf(mac_buf, "Do you want your possessions identified? ");
  457. X!         if(!flags.silent) SysBeep(1);
  458. X!         if ((c = "qqynq"[UseMacAlertText(129,mac_buf)+1]) == 'y') {
  459. X! #endif
  460. X!         /* New dump format by maartenj@cs.vu.nl */
  461. X!         struct obj *obj;
  462. X! 
  463. X!         for(obj = invent; obj && !done_stopprint; obj = obj->nobj) {
  464. X!             makeknown(obj->otyp);
  465. X!             obj->known = obj->bknown = obj->dknown = 1;
  466. X!         }
  467. X!         doinv(NULL);
  468. X!         end_box_display();
  469. X!         }
  470. X!         if (c == 'q')  done_stopprint++;
  471. X!         if (taken) {
  472. X!         /* paybill has already given the inventory locations in the shop
  473. X!          * and put it on the main object list
  474. X!          */
  475. X!         struct obj *obj;
  476. X! 
  477. X!         for(obj = invent; obj; obj = obj->nobj) {
  478. X!             obj->owornmask = 0;
  479. X!             if(rn2(5)) curse(obj);
  480. X!         }
  481. X!             invent = (struct obj *) 0;
  482. X!         }
  483. X!     }
  484. X! 
  485. X!     if (!done_stopprint) {
  486. X! #ifdef MACOS
  487. X!         c = "qqynq"[UseMacAlertText(129, "Do you want to see your instrinsics ?")+1];
  488. X! #else
  489. X!         pline("Do you want to see your intrinsics? ");
  490. X!         c = yn_function(ynqchars, 'y');
  491. X! #endif
  492. X!         if (c == 'y') enlightenment();
  493. X!         if (c == 'q') done_stopprint++;
  494. X!     }
  495. X  
  496. X      if(how < GENOCIDED) {
  497. X  #ifdef WIZARD
  498. X--- 414,430 ----
  499. X              Strcpy(kilbuf, "quit while already on Charon's boat");
  500. X          }
  501. X      }
  502. X!     if (how == ESCAPED || how == PANICKED)
  503. X!         killer_format = NO_KILLER_PREFIX;
  504. X! 
  505. X!     /* paybill() must be called unconditionally, or strange things will
  506. X!      * happen to bones levels */
  507. X      taken = paybill();
  508. X      paygd();
  509. X      clearlocks();
  510. X      if(flags.toplin == 1) more();
  511. X  
  512. X!     disclose(how,taken);
  513. X  
  514. X      if(how < GENOCIDED) {
  515. X  #ifdef WIZARD
  516. X***************
  517. X*** 464,472 ****
  518. X  #endif
  519. X                      ) {
  520. X          register struct monst *mtmp;
  521. X!         register struct obj *otmp;
  522. X          long i;
  523. X          register unsigned int worthlessct = 0;
  524. X  
  525. X          keepdogs();
  526. X          mtmp = mydogs;
  527. X--- 479,535 ----
  528. X  #endif
  529. X                      ) {
  530. X          register struct monst *mtmp;
  531. X!         register struct obj *otmp, *otmp2, *prevobj;
  532. X!         struct obj *jewels = (struct obj *)0;
  533. X          long i;
  534. X          register unsigned int worthlessct = 0;
  535. X+ #if defined(LINT) || defined(__GNULINT__)
  536. X+         prevobj = (struct obj *)0;
  537. X+ #endif
  538. X+ 
  539. X+         /* put items that count into jewels chain
  540. X+          * rewriting the fcobj and invent chains here is safe,
  541. X+          * as they'll never be used again
  542. X+          */
  543. X+         for(otmp = fcobj; otmp; otmp = otmp2) {
  544. X+             otmp2 = otmp->nobj;
  545. X+             if(carried(otmp->cobj)
  546. X+                     && ((otmp->olet == GEM_SYM &&
  547. X+                          otmp->otyp < LUCKSTONE)
  548. X+                         || otmp->olet == AMULET_SYM)) {
  549. X+                 if(otmp == fcobj)
  550. X+                     fcobj = otmp->nobj;
  551. X+                 else
  552. X+                     prevobj->nobj = otmp->nobj;
  553. X+                 otmp->nobj = jewels;
  554. X+                 jewels = otmp;
  555. X+             } else
  556. X+                 prevobj = otmp;
  557. X+         }
  558. X+         for(otmp = invent; otmp; otmp = otmp2) {
  559. X+             otmp2 = otmp->nobj;
  560. X+             if((otmp->olet == GEM_SYM && otmp->otyp < LUCKSTONE)
  561. X+                         || otmp->olet == AMULET_SYM) {
  562. X+                 if(otmp == invent)
  563. X+                     invent = otmp->nobj;
  564. X+                 else
  565. X+                     prevobj->nobj = otmp->nobj;
  566. X+                 otmp->nobj = jewels;
  567. X+                 jewels = otmp;
  568. X+             } else
  569. X+                 prevobj = otmp;
  570. X+         }
  571. X+ 
  572. X+         /* add points for jewels */
  573. X+         for(otmp = jewels; otmp; otmp = otmp->nobj) {
  574. X+             if(otmp->olet == GEM_SYM)
  575. X+                 u.urexp += (long) otmp->quan *
  576. X+                         objects[otmp->otyp].g_val;
  577. X+             else     /* amulet */
  578. X+                 u.urexp += (otmp->spe < 0) ? 2 :
  579. X+                     otmp->otyp == AMULET_OF_YENDOR ?
  580. X+                             5000 : 500;
  581. X+         }
  582. X  
  583. X          keepdogs();
  584. X          mtmp = mydogs;
  585. X***************
  586. X*** 498,507 ****
  587. X            Printf("You escaped from the dungeon with %ld points,\n",
  588. X  #endif
  589. X              u.urexp);
  590. X!         get_all_from_box(); /* don't forget things in boxes and bags */
  591. X!         for(otmp = invent; otmp; otmp = otmp->nobj) {
  592. X              if(otmp->olet == GEM_SYM && otmp->otyp < LUCKSTONE) {
  593. X-                 makeknown(otmp->otyp);
  594. X                  i = (long) otmp->quan *
  595. X                      objects[otmp->otyp].g_val;
  596. X                  if(i == 0) {
  597. X--- 561,571 ----
  598. X            Printf("You escaped from the dungeon with %ld points,\n",
  599. X  #endif
  600. X              u.urexp);
  601. X! 
  602. X!         /* print jewels chain here */
  603. X!         for(otmp = jewels; otmp; otmp = otmp->nobj) {
  604. X!             makeknown(otmp->otyp);
  605. X              if(otmp->olet == GEM_SYM && otmp->otyp < LUCKSTONE) {
  606. X                  i = (long) otmp->quan *
  607. X                      objects[otmp->otyp].g_val;
  608. X                  if(i == 0) {
  609. X***************
  610. X*** 508,522 ****
  611. X                      worthlessct += otmp->quan;
  612. X                      continue;
  613. X                  }
  614. X-                 u.urexp += i;
  615. X                  Printf("        %s (worth %ld zorkmids),\n",
  616. X                      doname(otmp), i);
  617. X!             } else if(otmp->olet == AMULET_SYM) {
  618. X                  otmp->known = 1;
  619. X                  i = (otmp->spe < 0) ? 2 :
  620. X                      otmp->otyp == AMULET_OF_YENDOR ?
  621. X                              5000 : 500;
  622. X-                 u.urexp += i;
  623. X                  Printf("        %s (worth %ld zorkmids),\n",
  624. X                      doname(otmp), i);
  625. X              }
  626. X--- 572,584 ----
  627. X                      worthlessct += otmp->quan;
  628. X                      continue;
  629. X                  }
  630. X                  Printf("        %s (worth %ld zorkmids),\n",
  631. X                      doname(otmp), i);
  632. X!             } else {        /* amulet */
  633. X                  otmp->known = 1;
  634. X                  i = (otmp->spe < 0) ? 2 :
  635. X                      otmp->otyp == AMULET_OF_YENDOR ?
  636. X                              5000 : 500;
  637. X                  Printf("        %s (worth %ld zorkmids),\n",
  638. X                      doname(otmp), i);
  639. X              }
  640. X*** src/Old/engrave.c    Sun Jun  3 12:57:34 1990
  641. X--- src/engrave.c    Sat May 26 22:14:12 1990
  642. X***************
  643. X*** 4,10 ****
  644. X  
  645. X  #include    "hack.h"
  646. X  
  647. X! VSTATIC struct engr {
  648. X      struct engr *nxt_engr;
  649. X      char *engr_txt;
  650. X      xchar engr_x, engr_y;
  651. X--- 4,10 ----
  652. X  
  653. X  #include    "hack.h"
  654. X  
  655. X! STATIC_VAR struct engr {
  656. X      struct engr *nxt_engr;
  657. X      char *engr_txt;
  658. X      xchar engr_x, engr_y;
  659. X***************
  660. X*** 16,25 ****
  661. X  #define BURN    3
  662. X  #define MARK    4
  663. X  #define POLY    5    /* temporary type - for polymorphing engraving */
  664. X! } *head_engr;
  665. X  
  666. X! OSTATIC void FDECL(del_engr, (struct engr *));
  667. X! OSTATIC struct engr * FDECL(engr_at,(XCHAR_P,XCHAR_P));
  668. X  
  669. X  #ifdef OVLB
  670. X  /* random engravings */
  671. X--- 16,25 ----
  672. X  #define BURN    3
  673. X  #define MARK    4
  674. X  #define POLY    5    /* temporary type - for polymorphing engraving */
  675. X! } NEARDATA *head_engr;
  676. X  
  677. X! STATIC_DCL void FDECL(del_engr, (struct engr *));
  678. X! STATIC_DCL struct engr * FDECL(engr_at,(XCHAR_P,XCHAR_P));
  679. X  
  680. X  #ifdef OVLB
  681. X  /* random engravings */
  682. X***************
  683. X*** 37,43 ****
  684. X  #endif /* OVLB */
  685. X  #ifdef OVL0
  686. X  
  687. X! XSTATIC struct engr *
  688. X  engr_at(x,y) register xchar x,y; {
  689. X  register struct engr *ep = head_engr;
  690. X      while(ep) {
  691. X--- 37,43 ----
  692. X  #endif /* OVLB */
  693. X  #ifdef OVL0
  694. X  
  695. X! STATIC_OVL struct engr *
  696. X  engr_at(x,y) register xchar x,y; {
  697. X  register struct engr *ep = head_engr;
  698. X      while(ep) {
  699. X***************
  700. X*** 182,187 ****
  701. X--- 182,189 ----
  702. X  freehand(){
  703. X      return(!uwep ||
  704. X         !uwep->cursed ||
  705. X+        (uwep->olet != WEAPON_SYM && uwep->otyp != TIN_OPENER
  706. X+         && uwep->otyp != PICK_AXE && uwep->otyp != UNICORN_HORN) || 
  707. X         (!bimanual(uwep) && (!uarms || !uarms->cursed)));
  708. X  /*    if ((uwep && bimanual(uwep)) ||
  709. X          (uwep && uarms))
  710. X***************
  711. X*** 190,198 ****
  712. X          return(1);*/
  713. X  }
  714. X  
  715. X! static const char styluses[] = { '#', '-', TOOL_SYM, WEAPON_SYM, WAND_SYM, 0 };
  716. X! static const char too_large[] = { ARMOR_SYM, BALL_SYM, ROCK_SYM, 0 };
  717. X! static const char paper[] = { SCROLL_SYM,
  718. X  #ifdef SPELLS
  719. X      SPBOOK_SYM,
  720. X  #endif
  721. X--- 192,200 ----
  722. X          return(1);*/
  723. X  }
  724. X  
  725. X! static const char NEARDATA styluses[] = { '#', '-', TOOL_SYM, WEAPON_SYM, WAND_SYM, 0 };
  726. X! static const char NEARDATA too_large[] = { ARMOR_SYM, BALL_SYM, ROCK_SYM, 0 };
  727. X! static const char NEARDATA paper[] = { SCROLL_SYM,
  728. X  #ifdef SPELLS
  729. X      SPBOOK_SYM,
  730. X  #endif
  731. X***************
  732. X*** 612,618 ****
  733. X      }
  734. X  }
  735. X  
  736. X! XSTATIC void
  737. X  del_engr(ep) register struct engr *ep; {
  738. X  register struct engr *ept;
  739. X      if(ep == head_engr)
  740. X--- 614,620 ----
  741. X      }
  742. X  }
  743. X  
  744. X! STATIC_OVL void
  745. X  del_engr(ep) register struct engr *ep; {
  746. X  register struct engr *ept;
  747. X      if(ep == head_engr)
  748. X*** src/Old/extralev.c    Sun Jun  3 12:58:12 1990
  749. X--- src/extralev.c    Sun Feb 25 14:47:26 1990
  750. X***************
  751. X*** 20,26 ****
  752. X  #define LEFT 4
  753. X  #define RIGHT 8
  754. X  
  755. X! static struct rogueroom r[3][3];
  756. X  static void FDECL(roguejoin,(int,int,int,int,int));
  757. X  static void FDECL(roguecorr,(int,int,int));
  758. X  static void FDECL(miniwalk,(int,int));
  759. X--- 20,26 ----
  760. X  #define LEFT 4
  761. X  #define RIGHT 8
  762. X  
  763. X! static struct rogueroom NEARDATA r[3][3];
  764. X  static void FDECL(roguejoin,(int,int,int,int,int));
  765. X  static void FDECL(roguecorr,(int,int,int));
  766. X  static void FDECL(miniwalk,(int,int));
  767. X*** src/Old/fountain.c    Sun Jun  3 12:58:29 1990
  768. X--- src/fountain.c    Wed May 23 17:45:37 1990
  769. X***************
  770. X*** 18,24 ****
  771. X      register int num = rnd(6);
  772. X      if (!(mons[PM_WATER_MOCCASIN].geno & G_GENOD)) {
  773. X          if (!Blind)
  774. X!             pline("An endless stream of snakes pours forth!");
  775. X          else
  776. X              You("hear something hissing!");
  777. X          while(num-- > 0) (void) makemon(&mons[PM_WATER_MOCCASIN],u.ux,u.uy);
  778. X--- 18,26 ----
  779. X      register int num = rnd(6);
  780. X      if (!(mons[PM_WATER_MOCCASIN].geno & G_GENOD)) {
  781. X          if (!Blind)
  782. X!             pline("An endless stream of %s pours forth!",
  783. X!                 Hallucination ? makeplural(rndmonnam())
  784. X!                 : "snakes");
  785. X          else
  786. X              You("hear something hissing!");
  787. X          while(num-- > 0) (void) makemon(&mons[PM_WATER_MOCCASIN],u.ux,u.uy);
  788. X***************
  789. X*** 116,122 ****
  790. X  dofindgem() /* Find a gem in the sparkling waters. */ {
  791. X  
  792. X      if (!Blind) You("spot a gem in the sparkling waters!");
  793. X!     (void) mkobj_at(GEM_SYM,u.ux,u.uy);
  794. X      levl[u.ux][u.uy].looted = T_LOOTED;
  795. X  }
  796. X  
  797. X--- 118,124 ----
  798. X  dofindgem() /* Find a gem in the sparkling waters. */ {
  799. X  
  800. X      if (!Blind) You("spot a gem in the sparkling waters!");
  801. X!     (void) mksobj_at(rnd_class(DILITHIUM_CRYSTAL, LUCKSTONE-1), u.ux, u.uy);
  802. X      levl[u.ux][u.uy].looted = T_LOOTED;
  803. X  }
  804. X  
  805. X***************
  806. X*** 352,358 ****
  807. X          return;
  808. X      }
  809. X      switch(rn2(20)) {
  810. X!         static struct obj *otmp;
  811. X          case 0: You("take a sip of very cold water.");
  812. X              break;
  813. X          case 1: You("take a sip of very warm water.");
  814. X--- 354,360 ----
  815. X          return;
  816. X      }
  817. X      switch(rn2(20)) {
  818. X!         static struct obj NEARDATA *otmp;
  819. X          case 0: You("take a sip of very cold water.");
  820. X              break;
  821. X          case 1: You("take a sip of very warm water.");
  822. X***************
  823. X*** 365,371 ****
  824. X          case 3: if (mons[PM_SEWER_RAT].geno & G_GENOD)
  825. X                  pline("The sink seems quite dirty.");
  826. X              else {
  827. X!                 static struct monst *mtmp;
  828. X  
  829. X                  mtmp = makemon(&mons[PM_SEWER_RAT], u.ux, u.uy);
  830. X                  pline("Eek!  There's %s in the sink!",
  831. X--- 367,373 ----
  832. X          case 3: if (mons[PM_SEWER_RAT].geno & G_GENOD)
  833. X                  pline("The sink seems quite dirty.");
  834. X              else {
  835. X!                 static struct monst NEARDATA *mtmp;
  836. X  
  837. X                  mtmp = makemon(&mons[PM_SEWER_RAT], u.ux, u.uy);
  838. X                  pline("Eek!  There's %s in the sink!",
  839. X***************
  840. X*** 391,397 ****
  841. X              break;
  842. X          case 5: if (!levl[u.ux][u.uy].looted) {
  843. X                  You("find a ring in the sink!");
  844. X!                 (void) mkobj_at(RING_SYM, u.ux, u.uy);
  845. X                  levl[u.ux][u.uy].looted = T_LOOTED;
  846. X              } else pline("Some dirty water backs up in the drain.");
  847. X              break;
  848. X--- 393,399 ----
  849. X              break;
  850. X          case 5: if (!levl[u.ux][u.uy].looted) {
  851. X                  You("find a ring in the sink!");
  852. X!                 (void) mkobj_at(RING_SYM, u.ux, u.uy, TRUE);
  853. X                  levl[u.ux][u.uy].looted = T_LOOTED;
  854. X              } else pline("Some dirty water backs up in the drain.");
  855. X              break;
  856. X*** src/Old/getline.c    Sun Jun  3 12:58:49 1990
  857. X--- src/getline.c    Fri Apr 13 18:45:39 1990
  858. X***************
  859. X*** 49,55 ****
  860. X          if((c = Getchar()) == EOF) {
  861. X              *bufp = 0;
  862. X  #ifdef MACOS
  863. X!     macflags |= (tmpflags & fDoNonKeyEvt);
  864. X  #endif
  865. X              return;
  866. X          }
  867. X--- 49,55 ----
  868. X          if((c = Getchar()) == EOF) {
  869. X              *bufp = 0;
  870. X  #ifdef MACOS
  871. X!     macflags = tmpflags;
  872. X  #endif
  873. X              return;
  874. X          }
  875. X***************
  876. X*** 57,63 ****
  877. X              *obufp = c;
  878. X              obufp[1] = 0;
  879. X  #ifdef MACOS
  880. X!     macflags |= (tmpflags & fDoNonKeyEvt);
  881. X  #endif
  882. X              return;
  883. X          }
  884. X--- 57,63 ----
  885. X              *obufp = c;
  886. X              obufp[1] = 0;
  887. X  #ifdef MACOS
  888. X!     macflags = tmpflags;
  889. X  #endif
  890. X              return;
  891. X          }
  892. X***************
  893. X*** 69,75 ****
  894. X          } else if(c == '\n') {
  895. X              *bufp = 0;
  896. X  #ifdef MACOS
  897. X!     macflags |= (tmpflags & fDoNonKeyEvt);
  898. X  #endif
  899. X              return;
  900. X          } else if(' ' <= c && c < '\177' && 
  901. X--- 69,75 ----
  902. X          } else if(c == '\n') {
  903. X              *bufp = 0;
  904. X  #ifdef MACOS
  905. X!     macflags = tmpflags;
  906. X  #endif
  907. X              return;
  908. X          } else if(' ' <= c && c < '\177' && 
  909. X***************
  910. X*** 93,99 ****
  911. X              bell();
  912. X      }
  913. X  #ifdef MACOS
  914. X!     macflags |= (tmpflags & fDoNonKeyEvt);
  915. X  #endif
  916. X  }
  917. X  
  918. X--- 93,99 ----
  919. X              bell();
  920. X      }
  921. X  #ifdef MACOS
  922. X!     macflags = tmpflags;
  923. X  #endif
  924. X  }
  925. X  
  926. X***************
  927. X*** 128,137 ****
  928. X--- 128,143 ----
  929. X  register const char *s;    /* chars allowed besides space or return */
  930. X  {
  931. X      register int c;
  932. X+ #ifdef MACOS
  933. X+     short    tmpflags;
  934. X+ #endif
  935. X  
  936. X      morc = 0;
  937. X  #ifdef MACOS
  938. X      flags.wantspace = TRUE;
  939. X+     tmpflags = macflags;
  940. X+     macflags &= ~fDoNonKeyEvt;
  941. X+     HideCursor();
  942. X  #endif
  943. X  
  944. X      while((c = readchar()) != '\n') {
  945. X***************
  946. X*** 149,155 ****
  947. X--- 155,163 ----
  948. X      }
  949. X  
  950. X  #ifdef MACOS
  951. X+     ShowCursor();
  952. X      flags.wantspace = FALSE;
  953. X+     macflags = tmpflags;
  954. X  #endif
  955. X  }
  956. X  
  957. X***************
  958. X*** 156,162 ****
  959. X  #endif /* OVL1 */
  960. X  #ifdef OVL0
  961. X  
  962. X! static int last_multi;
  963. X  
  964. X  char *
  965. X  parse()
  966. X--- 164,170 ----
  967. X  #endif /* OVL1 */
  968. X  #ifdef OVL0
  969. X  
  970. X! static int NEARDATA last_multi;
  971. X  
  972. X  char *
  973. X  parse()
  974. X***************
  975. X*** 293,298 ****
  976. X--- 301,312 ----
  977. X      register char *obufp = bufp;
  978. X      register int c;
  979. X      int com_index, oindex;
  980. X+ #ifdef MACOS
  981. X+     short tmpflags;
  982. X+     
  983. X+     tmpflags = macflags & ~(fExtCmdSeq1 | fExtCmdSeq2 | fExtCmdSeq3);
  984. X+     macflags &= ~fDoNonKeyEvt;
  985. X+ #endif
  986. X  
  987. X      flags.toplin = 2;        /* nonempty, no --More-- required */
  988. X  
  989. X***************
  990. X*** 300,310 ****
  991. X--- 314,330 ----
  992. X          (void) fflush(stdout);
  993. X          if((c = readchar()) == EOF) {
  994. X              *bufp = 0;
  995. X+ #ifdef MACOS
  996. X+             macflags = tmpflags;
  997. X+ #endif
  998. X              return;
  999. X          }
  1000. X          if(c == '\033') {
  1001. X              *obufp = c;
  1002. X              obufp[1] = 0;
  1003. X+ #ifdef MACOS
  1004. X+             macflags = tmpflags;
  1005. X+ #endif
  1006. X              return;
  1007. X          }
  1008. X          if(c == erase_char || c == '\b') {
  1009. X***************
  1010. X*** 314,319 ****
  1011. X--- 334,342 ----
  1012. X              } else    bell();
  1013. X          } else if(c == '\n') {
  1014. X              *bufp = 0;
  1015. X+ #ifdef MACOS
  1016. X+             macflags = tmpflags;
  1017. X+ #endif
  1018. X              return;
  1019. X          } else if(' ' <= c && c < '\177') {
  1020. X                  /* avoid isprint() - some people don't have it
  1021. X***************
  1022. X*** 355,360 ****
  1023. X--- 378,386 ----
  1024. X          } else
  1025. X              bell();
  1026. X      }
  1027. X+ #ifdef MACOS
  1028. X+     macflags = tmpflags;
  1029. X+ #endif
  1030. X  
  1031. X  }
  1032. X  #endif /* COM_COMPL */
  1033. X*** src/Old/hack.c    Sun Jun  3 12:59:10 1990
  1034. X--- src/hack.c    Thu May 31 22:10:54 1990
  1035. X***************
  1036. X*** 7,18 ****
  1037. X  static    const char    SCCS_Id[] = "@(#)hack.c    3.0\t89/11/20";
  1038. X  #endif
  1039. X  
  1040. X! OSTATIC int NDECL(moverock);
  1041. X  #ifdef SINKS
  1042. X! OSTATIC void NDECL(dosinkfall);
  1043. X  #endif
  1044. X  static boolean FDECL(is_edge,(XCHAR_P,XCHAR_P));
  1045. X  static boolean FDECL(bad_rock,(XCHAR_P,XCHAR_P));
  1046. X  
  1047. X  #ifdef OVLB
  1048. X  
  1049. X--- 7,21 ----
  1050. X  static    const char    SCCS_Id[] = "@(#)hack.c    3.0\t89/11/20";
  1051. X  #endif
  1052. X  
  1053. X! STATIC_DCL int NDECL(moverock);
  1054. X  #ifdef SINKS
  1055. X! STATIC_DCL void NDECL(dosinkfall);
  1056. X  #endif
  1057. X+ 
  1058. X+ #ifdef OVL1
  1059. X  static boolean FDECL(is_edge,(XCHAR_P,XCHAR_P));
  1060. X  static boolean FDECL(bad_rock,(XCHAR_P,XCHAR_P));
  1061. X+ #endif /* OVL1 */
  1062. X  
  1063. X  #ifdef OVLB
  1064. X  
  1065. X***************
  1066. X*** 28,44 ****
  1067. X  
  1068. X      if(seehx){
  1069. X          seehx = 0;
  1070. X!     } else
  1071. X!     for(x = u.ux-1; x < u.ux+2; x++)
  1072. X!         for(y = u.uy-1; y < u.uy+2; y++) {
  1073. X!         if(!isok(x, y)) continue;
  1074. X!         lev = &levl[x][y];
  1075. X!         if(!lev->lit && lev->scrsym == ROOM_SYM) {
  1076. X              lev->scrsym = STONE_SYM;
  1077. X              lev->new = 1;
  1078. X              on_scr(x,y);
  1079. X!         }
  1080. X!         }
  1081. X  }
  1082. X  
  1083. X  /* called:
  1084. X--- 31,54 ----
  1085. X  
  1086. X      if(seehx){
  1087. X          seehx = 0;
  1088. X!     } 
  1089. X!     /*
  1090. X!      *  Erase surrounding positions if needed.  We don't need to do this
  1091. X!      *  if we are blind, since we can't see them anyway.  This removes the
  1092. X!      *  pl6 bug that makes monsters disappear if they are next to you if
  1093. X!      *  you teleport while blind and telepathic.
  1094. X!      */
  1095. X!     else if(!Blind)
  1096. X!         for(x = u.ux-1; x < u.ux+2; x++)
  1097. X!             for(y = u.uy-1; y < u.uy+2; y++) {
  1098. X!             if(!isok(x, y)) continue;
  1099. X!             lev = &levl[x][y];
  1100. X!             if(!lev->lit && lev->scrsym == ROOM_SYM) {
  1101. X              lev->scrsym = STONE_SYM;
  1102. X              lev->new = 1;
  1103. X              on_scr(x,y);
  1104. X!             }
  1105. X!             }
  1106. X  }
  1107. X  
  1108. X  /* called:
  1109. X***************
  1110. X*** 87,96 ****
  1111. X  #endif /* OVLB */
  1112. X  #ifdef OVL2
  1113. X  
  1114. X! XSTATIC int
  1115. X  moverock() {
  1116. X      register xchar rx, ry;
  1117. X!     register struct obj *otmp;
  1118. X      register struct trap *ttmp;
  1119. X      register struct    monst *mtmp;
  1120. X  
  1121. X--- 97,106 ----
  1122. X  #endif /* OVLB */
  1123. X  #ifdef OVL2
  1124. X  
  1125. X! STATIC_OVL int
  1126. X  moverock() {
  1127. X      register xchar rx, ry;
  1128. X!     register struct obj *otmp, *otmp2;
  1129. X      register struct trap *ttmp;
  1130. X      register struct    monst *mtmp;
  1131. X  
  1132. X***************
  1133. X*** 172,177 ****
  1134. X--- 182,204 ----
  1135. X                  delobj(otmp);
  1136. X                  continue;
  1137. X              }
  1138. X+                 /*
  1139. X+                  * Re-link at top of fobj chain so that 
  1140. X+                  * pile order is preserved when level is 
  1141. X+                  * restored.
  1142. X+                  */
  1143. X+             if (otmp != fobj) {
  1144. X+                 otmp2 = fobj;
  1145. X+                 while (otmp2->nobj && otmp2->nobj != otmp) 
  1146. X+                     otmp2 = otmp2->nobj;
  1147. X+                 if (!otmp2->nobj)
  1148. X+                     impossible("moverock: error in fobj chain");
  1149. X+                 else {
  1150. X+                     otmp2->nobj = otmp->nobj;    
  1151. X+                     otmp->nobj = fobj;
  1152. X+                     fobj = otmp;
  1153. X+                 }
  1154. X+             }
  1155. X              move_object(otmp, rx, ry);
  1156. X              /* pobj(otmp); */
  1157. X              if(cansee(rx,ry)) atl(rx,ry,otmp->olet);
  1158. X***************
  1159. X*** 182,188 ****
  1160. X              long lastmovetime;
  1161. X              lastmovetime = 0;
  1162. X  #else
  1163. X!             static long lastmovetime;
  1164. X  #endif
  1165. X              /* note: this var contains garbage initially and
  1166. X                 after a restore */
  1167. X--- 209,215 ----
  1168. X              long lastmovetime;
  1169. X              lastmovetime = 0;
  1170. X  #else
  1171. X!             static long NEARDATA lastmovetime;
  1172. X  #endif
  1173. X              /* note: this var contains garbage initially and
  1174. X                 after a restore */
  1175. X***************
  1176. X*** 229,241 ****
  1177. X  register xchar ox, oy;
  1178. X  {
  1179. X      remove_object(obj);
  1180. X!     newsym(obj->ox, obj->oy);
  1181. X      place_object(obj, ox, oy);
  1182. X!     newsym(ox, oy);
  1183. X  }
  1184. X  
  1185. X  #ifdef SINKS
  1186. X! XSTATIC
  1187. X  void
  1188. X  dosinkfall() {
  1189. X      register struct obj *obj;
  1190. X--- 256,276 ----
  1191. X  register xchar ox, oy;
  1192. X  {
  1193. X      remove_object(obj);
  1194. X!     if (cansee(obj->ox, obj->oy)) {
  1195. X!         levl[obj->ox][obj->oy].seen = 0;
  1196. X!         prl(obj->ox, obj->oy);
  1197. X!     } else
  1198. X!         newsym(obj->ox, obj->oy);
  1199. X      place_object(obj, ox, oy);
  1200. X!     if (cansee(ox, oy)) {
  1201. X!         levl[ox][oy].seen = 0;
  1202. X!         prl(ox, oy);
  1203. X!     } else
  1204. X!         newsym(ox, oy);
  1205. X  }
  1206. X  
  1207. X  #ifdef SINKS
  1208. X! STATIC_OVL
  1209. X  void
  1210. X  dosinkfall() {
  1211. X      register struct obj *obj;
  1212. X***************
  1213. X*** 323,329 ****
  1214. X  
  1215. X  void
  1216. X  domove() {
  1217. X!     register struct monst *mtmp = (struct monst *)0;
  1218. X      register struct rm *tmpr,*ust;
  1219. X      register xchar x,y;
  1220. X      struct trap *trap;
  1221. X--- 358,364 ----
  1222. X  
  1223. X  void
  1224. X  domove() {
  1225. X!     register struct monst *mtmp;
  1226. X      register struct rm *tmpr,*ust;
  1227. X      register xchar x,y;
  1228. X      struct trap *trap;
  1229. X***************
  1230. X*** 393,400 ****
  1231. X  #endif
  1232. X              }
  1233. X          }
  1234. X!         if (MON_AT(x, y)) {
  1235. X!             mtmp = m_at(x,y);
  1236. X              /* Don't attack if you're running */
  1237. X              if (flags.run && !mtmp->mimic &&
  1238. X                      (Blind ? Telepat :
  1239. X--- 428,435 ----
  1240. X  #endif
  1241. X              }
  1242. X          }
  1243. X!         mtmp = m_at(x,y);
  1244. X!         if (mtmp) {
  1245. X              /* Don't attack if you're running */
  1246. X              if (flags.run && !mtmp->mimic &&
  1247. X                      (Blind ? Telepat :
  1248. X***************
  1249. X*** 548,554 ****
  1250. X      }
  1251. X  #ifdef POLYSELF
  1252. X      if (tunnels(uasmon) && !needspick(uasmon) && IS_ROCK(tmpr->typ)) {
  1253. X!         static const char *digtxt;
  1254. X  
  1255. X          if(dig_pos.x != x || dig_pos.y != y
  1256. X              || dig_level != dlevel || dig_down) {
  1257. X--- 583,589 ----
  1258. X      }
  1259. X  #ifdef POLYSELF
  1260. X      if (tunnels(uasmon) && !needspick(uasmon) && IS_ROCK(tmpr->typ)) {
  1261. X!         static const char NEARDATA *digtxt;
  1262. X  
  1263. X          if(dig_pos.x != x || dig_pos.y != y
  1264. X              || dig_level != dlevel || dig_down) {
  1265. X***************
  1266. X*** 755,769 ****
  1267. X  #endif
  1268. X      if(Blind || flags.run == 0) return;
  1269. X      for(x = u.ux-1; x <= u.ux+1; x++) for(y = u.uy-1; y <= u.uy+1; y++) {
  1270. X  #ifdef POLYSELF
  1271. X          if(u.umonnum == PM_GRID_BUG && x != u.ux && y != u.uy) continue;
  1272. X  #endif
  1273. X          if(x == u.ux && y == u.uy) continue;
  1274. X!         if(MON_AT(x, y) && (mtmp = m_at(x,y)) && !mtmp->mimic &&
  1275. X              (!mtmp->minvis || See_invisible) && !mtmp->mundetected) {
  1276. X!             if((flags.run != 1 && !mtmp->mtame) || (x == u.ux+u.dx && y == u.uy+u.dy))
  1277. X                  goto stop;
  1278. X!         } else mtmp = 0;
  1279. X          if(levl[x][y].typ == STONE) continue;
  1280. X          if(x == u.ux-u.dx && y == u.uy-u.dy) continue;
  1281. X          {
  1282. X--- 790,806 ----
  1283. X  #endif
  1284. X      if(Blind || flags.run == 0) return;
  1285. X      for(x = u.ux-1; x <= u.ux+1; x++) for(y = u.uy-1; y <= u.uy+1; y++) {
  1286. X+         if(!isok(x,y)) continue;
  1287. X  #ifdef POLYSELF
  1288. X          if(u.umonnum == PM_GRID_BUG && x != u.ux && y != u.uy) continue;
  1289. X  #endif
  1290. X          if(x == u.ux && y == u.uy) continue;
  1291. X!         if((mtmp = m_at(x,y)) && !mtmp->mimic &&
  1292. X              (!mtmp->minvis || See_invisible) && !mtmp->mundetected) {
  1293. X!             if((flags.run != 1 && !mtmp->mtame)
  1294. X!                     || (x == u.ux+u.dx && y == u.uy+u.dy))
  1295. X                  goto stop;
  1296. X!         }
  1297. X          if(levl[x][y].typ == STONE) continue;
  1298. X          if(x == u.ux-u.dx && y == u.uy-u.dy) continue;
  1299. X          {
  1300. X***************
  1301. X*** 861,868 ****
  1302. X      if(!Blind)
  1303. X      for(x = u.ux-1; x <= u.ux+1; x++)
  1304. X          for(y = u.uy-1; y <= u.uy+1; y++) {
  1305. X          if(x == u.ux && y == u.uy) continue;
  1306. X!         if(MON_AT(x, y) && (mtmp = m_at(x,y)) && !mtmp->mimic &&
  1307. X             !mtmp->mtame && !mtmp->mpeaceful &&
  1308. X             !noattacks(mtmp->data) &&
  1309. X             mtmp->mcanmove && !mtmp->msleep &&  /* aplvax!jcn */
  1310. X--- 898,906 ----
  1311. X      if(!Blind)
  1312. X      for(x = u.ux-1; x <= u.ux+1; x++)
  1313. X          for(y = u.uy-1; y <= u.uy+1; y++) {
  1314. X+         if(!isok(x,y)) continue;
  1315. X          if(x == u.ux && y == u.uy) continue;
  1316. X!         if((mtmp = m_at(x,y)) && !mtmp->mimic &&
  1317. X             !mtmp->mtame && !mtmp->mpeaceful &&
  1318. X             !noattacks(mtmp->data) &&
  1319. X             mtmp->mcanmove && !mtmp->msleep &&  /* aplvax!jcn */
  1320. X***************
  1321. X*** 931,936 ****
  1322. X--- 969,975 ----
  1323. X      } else {
  1324. X          for(ux = u.ux-1; ux <= u.ux+1; ux++)
  1325. X              for(uy = u.uy-1; uy <= u.uy+1; uy++) {
  1326. X+                 if(!isok(ux,uy)) continue;
  1327. X                  if(IS_ROCK(levl[ux][uy].typ) ||
  1328. X                      IS_DOOR(levl[ux][uy].typ)) continue;
  1329. X                  /* might have side-by-side walls, in which case
  1330. X*** src/Old/invent.c    Sun Jun  3 12:59:53 1990
  1331. X--- src/invent.c    Thu May 31 22:11:37 1990
  1332. X***************
  1333. X*** 11,30 ****
  1334. X  
  1335. X  #define    NOINVSYM    '#'
  1336. X  
  1337. X  static boolean FDECL(mergable,(struct obj *,struct obj *));
  1338. X- OSTATIC void FDECL(assigninvlet,(struct obj *));
  1339. X  static int FDECL(merged,(struct obj *,struct obj *,int));
  1340. X! OSTATIC struct obj *FDECL(mkgoldobj,(long));
  1341. X! #ifndef OVERLAY
  1342. X! static int FDECL(ckunpaid,(struct obj *));
  1343. X! #else
  1344. X! int FDECL(ckunpaid,(struct obj *));
  1345. X! #endif
  1346. X  static boolean NDECL(wearing_armor);
  1347. X  static boolean FDECL(is_worn,(struct obj *));
  1348. X! static char FDECL(obj_to_let,(struct obj *));
  1349. X  
  1350. X! OSTATIC char *FDECL(xprname,(struct obj *,CHAR_P,BOOLEAN_P));
  1351. X  
  1352. X  #ifdef OVLB
  1353. X  
  1354. X--- 11,30 ----
  1355. X  
  1356. X  #define    NOINVSYM    '#'
  1357. X  
  1358. X+ #ifdef OVL1
  1359. X  static boolean FDECL(mergable,(struct obj *,struct obj *));
  1360. X  static int FDECL(merged,(struct obj *,struct obj *,int));
  1361. X! #endif /* OVL1 */
  1362. X! STATIC_DCL void FDECL(assigninvlet,(struct obj *));
  1363. X! STATIC_DCL struct obj *FDECL(mkgoldobj,(long));
  1364. X! STATIC_PTR int FDECL(ckunpaid,(struct obj *));
  1365. X! #ifdef OVLB
  1366. X  static boolean NDECL(wearing_armor);
  1367. X  static boolean FDECL(is_worn,(struct obj *));
  1368. X! #endif /* OVLB */
  1369. X! STATIC_DCL char FDECL(obj_to_let,(struct obj *));
  1370. X  
  1371. X! STATIC_DCL char *FDECL(xprname,(struct obj *,CHAR_P,BOOLEAN_P));
  1372. X  
  1373. X  #ifdef OVLB
  1374. X  
  1375. X***************
  1376. X*** 38,44 ****
  1377. X      POTION_SYM, RING_SYM, WAND_SYM, TOOL_SYM, GEM_SYM,
  1378. X      ROCK_SYM, BALL_SYM, CHAIN_SYM, 0 };
  1379. X  
  1380. X! XSTATIC void
  1381. X  assigninvlet(otmp)
  1382. X  register struct obj *otmp;
  1383. X  {
  1384. X--- 38,44 ----
  1385. X      POTION_SYM, RING_SYM, WAND_SYM, TOOL_SYM, GEM_SYM,
  1386. X      ROCK_SYM, BALL_SYM, CHAIN_SYM, 0 };
  1387. X  
  1388. X! STATIC_OVL void
  1389. X  assigninvlet(otmp)
  1390. X  register struct obj *otmp;
  1391. X  {
  1392. X***************
  1393. X*** 175,180 ****
  1394. X--- 175,183 ----
  1395. X      }
  1396. X  }
  1397. X  
  1398. X+ #endif /* OVLB */
  1399. X+ #ifdef OVL3
  1400. X+ 
  1401. X  void
  1402. X  freeinv(obj)
  1403. X  register struct obj *obj;
  1404. X***************
  1405. X*** 202,207 ****
  1406. X--- 205,213 ----
  1407. X      }
  1408. X  }
  1409. X  
  1410. X+ #endif /* OVL3 */
  1411. X+ #ifdef OVL2
  1412. X+ 
  1413. X  /* destroy object in fobj chain (if unpaid, it remains on the bill) */
  1414. X  void
  1415. X  delobj(obj)
  1416. X***************
  1417. X*** 272,278 ****
  1418. X  #endif
  1419. X  }
  1420. X  
  1421. X! #endif /* OVLB */
  1422. X  #ifdef OVL0
  1423. X  
  1424. X  struct obj *
  1425. X--- 278,284 ----
  1426. X  #endif
  1427. X  }
  1428. X  
  1429. X! #endif /* OVL2 */
  1430. X  #ifdef OVL0
  1431. X  
  1432. X  struct obj *
  1433. X***************
  1434. X*** 348,353 ****
  1435. X--- 354,362 ----
  1436. X      return(FALSE);
  1437. X  }
  1438. X  
  1439. X+ #endif /* OVLB */
  1440. X+ #ifdef OVL2
  1441. X+ 
  1442. X  struct gold *
  1443. X  g_at(x,y)
  1444. X  register int x, y;
  1445. X***************
  1446. X*** 360,367 ****
  1447. X      return((struct gold *)0);
  1448. X  }
  1449. X  
  1450. X  /* make dummy object structure containing gold - for temporary use only */
  1451. X! XSTATIC
  1452. X  struct obj *
  1453. X  mkgoldobj(q)
  1454. X  register long q;
  1455. X--- 369,379 ----
  1456. X      return((struct gold *)0);
  1457. X  }
  1458. X  
  1459. X+ #endif /* OVL2 */
  1460. X+ #ifdef OVLB
  1461. X+ 
  1462. X  /* make dummy object structure containing gold - for temporary use only */
  1463. X! STATIC_OVL
  1464. X  struct obj *
  1465. X  mkgoldobj(q)
  1466. X  register long q;
  1467. X***************
  1468. X*** 497,502 ****
  1469. X--- 509,521 ----
  1470. X          return((struct obj *)0);
  1471. X      }
  1472. X      for(;;) {
  1473. X+ #ifdef MACOS
  1474. X+         short    tmpflags;
  1475. X+         extern short macflags;
  1476. X+         
  1477. X+         tmpflags = macflags;
  1478. X+         macflags &= ~fDoNonKeyEvt;
  1479. X+ #endif
  1480. X          if(!buf[0]) {
  1481. X  #ifdef REDO
  1482. X              if(!in_doagain)
  1483. X***************
  1484. X*** 520,525 ****
  1485. X--- 539,547 ----
  1486. X              allowcnt = 2;    /* signal presence of cnt */
  1487. X              ilet = readchar();
  1488. X          }
  1489. X+ #ifdef MACOS
  1490. X+         macflags = tmpflags;
  1491. X+ #endif
  1492. X          if(digit(ilet)) {
  1493. X              pline("No count allowed with this command.");
  1494. X              continue;
  1495. X***************
  1496. X*** 624,633 ****
  1497. X  #endif /* OVL1 */
  1498. X  #ifdef OVLB
  1499. X  
  1500. X! #ifndef OVERLAY
  1501. X! static 
  1502. X! #endif
  1503. X! int
  1504. X  ckunpaid(otmp)
  1505. X  register struct obj *otmp;
  1506. X  {
  1507. X--- 646,652 ----
  1508. X  #endif /* OVL1 */
  1509. X  #ifdef OVLB
  1510. X  
  1511. X! STATIC_PTR int
  1512. X  ckunpaid(otmp)
  1513. X  register struct obj *otmp;
  1514. X  {
  1515. X***************
  1516. X*** 650,656 ****
  1517. X      return(!!(otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL | W_WEP)));
  1518. X  }
  1519. X  
  1520. X! static const char removeables[] =
  1521. X      { ARMOR_SYM, WEAPON_SYM, RING_SYM, AMULET_SYM, TOOL_SYM, ' ', 0 };
  1522. X  
  1523. X  /* interactive version of getobj - used for Drop, Identify and */
  1524. X--- 669,675 ----
  1525. X      return(!!(otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL | W_WEP)));
  1526. X  }
  1527. X  
  1528. X! static const char NEARDATA removeables[] =
  1529. X      { ARMOR_SYM, WEAPON_SYM, RING_SYM, AMULET_SYM, TOOL_SYM, ' ', 0 };
  1530. X  
  1531. X  /* interactive version of getobj - used for Drop, Identify and */
  1532. X***************
  1533. X*** 821,827 ****
  1534. X      return(cnt);
  1535. X  }
  1536. X  
  1537. X! static char
  1538. X  obj_to_let(obj)    /* should of course only be called for things in invent */
  1539. X  register struct obj *obj;
  1540. X  {
  1541. X--- 840,850 ----
  1542. X      return(cnt);
  1543. X  }
  1544. X  
  1545. X! #endif /* OVLB */
  1546. X! #ifdef OVL2
  1547. X! 
  1548. X! STATIC_OVL
  1549. X! char
  1550. X  obj_to_let(obj)    /* should of course only be called for things in invent */
  1551. X  register struct obj *obj;
  1552. X  {
  1553. X***************
  1554. X*** 843,852 ****
  1555. X      pline(xprname(obj, obj_to_let(obj), TRUE));
  1556. X  }
  1557. X  
  1558. X! #endif /* OVLB */
  1559. X  #ifdef OVL1
  1560. X  
  1561. X! XSTATIC char *
  1562. X  xprname(obj,let,dot)
  1563. X  register struct obj *obj;
  1564. X  register char let;
  1565. X--- 866,875 ----
  1566. X      pline(xprname(obj, obj_to_let(obj), TRUE));
  1567. X  }
  1568. X  
  1569. X! #endif /* OVL2 */
  1570. X  #ifdef OVL1
  1571. X  
  1572. X! STATIC_OVL char *
  1573. X  xprname(obj,let,dot)
  1574. X  register struct obj *obj;
  1575. X  register char let;
  1576. X***************
  1577. X*** 1340,1345 ****
  1578. X--- 1363,1371 ----
  1579. X      delobj(otmp);
  1580. X  }
  1581. X  
  1582. X+ #endif /* OVLB */
  1583. X+ #ifdef OVL1
  1584. X+ 
  1585. X  /*
  1586. X   * Convert from a symbol to a string for printing object classes
  1587. X   *
  1588. X***************
  1589. X*** 1350,1356 ****
  1590. X   *    WAND_SYM, [SPBOOK_SYM], RING_SYM, GEM_SYM, 0 };
  1591. X   */
  1592. X  
  1593. X! static const char *names[] = {
  1594. X      "Illegal objects", "Amulets", "Comestibles", "Weapons",
  1595. X      "Tools", "Iron balls", "Chains", "Boulders/Statues", "Armor",
  1596. X      "Potions", "Scrolls", "Wands",
  1597. X--- 1376,1382 ----
  1598. X   *    WAND_SYM, [SPBOOK_SYM], RING_SYM, GEM_SYM, 0 };
  1599. X   */
  1600. X  
  1601. X! static const char NEARDATA *names[] = {
  1602. X      "Illegal objects", "Amulets", "Comestibles", "Weapons",
  1603. X      "Tools", "Iron balls", "Chains", "Boulders/Statues", "Armor",
  1604. X      "Potions", "Scrolls", "Wands",
  1605. X***************
  1606. X*** 1365,1371 ****
  1607. X  {
  1608. X      const char *pos = index(obj_symbols, let);
  1609. X      /* arbitrary buffer size by Tom May (tom@uw-warp) */
  1610. X!     static char *buf = NULL;
  1611. X  
  1612. X      if (buf == NULL)
  1613. X          buf = (char *) alloc ((unsigned)(strlen(HI)+17+strlen(HE)));
  1614. X--- 1391,1397 ----
  1615. X  {
  1616. X      const char *pos = index(obj_symbols, let);
  1617. X      /* arbitrary buffer size by Tom May (tom@uw-warp) */
  1618. X!     static char NEARDATA *buf = NULL;
  1619. X  
  1620. X      if (buf == NULL)
  1621. X          buf = (char *) alloc ((unsigned)(strlen(HI)+17+strlen(HE)));
  1622. X***************
  1623. X*** 1382,1387 ****
  1624. X--- 1408,1416 ----
  1625. X          Sprintf(buf, "%s", names[pos - obj_symbols]);
  1626. X      return (buf);
  1627. X  }
  1628. X+ 
  1629. X+ #endif /* OVL1 */
  1630. X+ #ifdef OVLB
  1631. X  
  1632. X  void
  1633. X  reassign()
  1634. X*** src/Old/ioctl.c    Sun Jun  3 13:00:40 1990
  1635. X--- src/ioctl.c    Tue May  8 19:14:56 1990
  1636. X***************
  1637. X*** 6,11 ****
  1638. X--- 6,12 ----
  1639. X     systems (e.g. MUNIX) the include files <termio.h> and <sgtty.h>
  1640. X     define the same constants, and the C preprocessor complains. */
  1641. X  
  1642. X+ #ifndef VMS
  1643. X  /* block some unused #defines to avoid overloading some cpp's */
  1644. X  #define MONATTK_H
  1645. X  #define MONFLAG_H
  1646. X***************
  1647. X*** 89,91 ****
  1648. X--- 90,93 ----
  1649. X      return(0);
  1650. X  }
  1651. X  #endif /* SUSPEND /**/
  1652. X+ #endif /*VMS*/
  1653. X*** src/Old/lev_comp.l    Sun Jun  3 13:02:02 1990
  1654. X--- src/lev_comp.l    Wed Apr 25 17:07:32 1990
  1655. X***************
  1656. X*** 28,33 ****
  1657. X--- 28,34 ----
  1658. X  
  1659. X  #ifdef MSDOS
  1660. X  #undef exit
  1661. X+ extern void FDECL(exit, (int));
  1662. X  #endif
  1663. X  
  1664. X  /* this doesn't always get put in lev_comp.h
  1665. X*** src/Old/lev_comp.y    Sun Jun  3 13:02:18 1990
  1666. X--- src/lev_comp.y    Wed Apr 25 17:07:36 1990
  1667. X***************
  1668. X*** 49,54 ****
  1669. X--- 49,55 ----
  1670. X  
  1671. X  #ifdef MSDOS
  1672. X  # undef exit
  1673. X+ extern void FDECL(exit, (int));
  1674. X  #endif
  1675. X  
  1676. X  #ifdef MACOS
  1677. X*** src/Old/lev_main.c    Sun Jun  3 13:03:18 1990
  1678. X--- src/lev_main.c    Fri May 18 18:40:57 1990
  1679. X***************
  1680. X*** 9,19 ****
  1681. X  
  1682. X  /* #include "hack.h"    /* uncomment for the Mac */
  1683. X  
  1684. X! #ifdef AMIGA
  1685. X! #include "hack.h"
  1686. X! #undef exit
  1687. X! #endif
  1688. X  #include <stdio.h>
  1689. X  
  1690. X  #define MAX_ERRORS    25
  1691. X  
  1692. X--- 9,32 ----
  1693. X  
  1694. X  /* #include "hack.h"    /* uncomment for the Mac */
  1695. X  
  1696. X! #ifndef VMS
  1697. X! # if defined(AMIGA) || defined(MSDOS)
  1698. X! #  include "hack.h"
  1699. X! #  undef exit
  1700. X! #  ifdef MSDOS
  1701. X! extern void FDECL(exit, (int));
  1702. X! #  endif
  1703. X! # else
  1704. X! #  include <stdio.h>
  1705. X! # endif
  1706. X! #else  /*VMS*/
  1707. X! # ifdef ANCIENT_VAXC    /* need KR1ED setup */
  1708. X! #  define GLOBAL_H      /* don't need other stuff */
  1709. X! #include "config.h"
  1710. X! # endif
  1711. X  #include <stdio.h>
  1712. X+ # define exit vms_exit
  1713. X+ #endif /*VMS*/
  1714. X  
  1715. X  #define MAX_ERRORS    25
  1716. X  
  1717. X***************
  1718. X*** 59,67 ****
  1719. X      long    j;
  1720. X      extern struct permonst *mons;
  1721. X      extern struct objclass *objects;
  1722. X  
  1723. X      /* sub in the Nethack resource filename */
  1724. X!     strcpy((char *)name, "\010NH3.rsrc");
  1725. X      yysbuf = (char *)alloc(YYLMAX);
  1726. X      yysptr = yysbuf;
  1727. X      yytext = (char *)alloc(YYLMAX);
  1728. X--- 72,81 ----
  1729. X      long    j;
  1730. X      extern struct permonst *mons;
  1731. X      extern struct objclass *objects;
  1732. X+     char descrip[3][32];    /* 3 special level description files */
  1733. X  
  1734. X      /* sub in the Nethack resource filename */
  1735. X!     Strcpy((char *)name, "\021nethack.proj.rsrc");
  1736. X      yysbuf = (char *)alloc(YYLMAX);
  1737. X      yysptr = yysbuf;
  1738. X      yytext = (char *)alloc(YYLMAX);
  1739. X***************
  1740. X*** 92,99 ****
  1741. X      } else {
  1742. X          panic("Can't get OBJECT resource data.");
  1743. X      }
  1744. X! # ifdef THINKC4
  1745. X!     argc = ccommand(&argv);
  1746. X  # endif
  1747. X  #endif
  1748. X  
  1749. X--- 106,119 ----
  1750. X      } else {
  1751. X          panic("Can't get OBJECT resource data.");
  1752. X      }
  1753. X!     Sprintf(descrip[1], "%s", ":auxil:castle.des");
  1754. X!     Sprintf(descrip[2], "%s", ":auxil:endgame.des");
  1755. X!     Sprintf(descrip[3], "%s", ":auxil:tower.des");
  1756. X!     argc = 4;    /* argv[0] is irrelevant, argv[i] = descrip[i] */
  1757. X! #else   /* !MACOS || !SMALLDATA */
  1758. X! # ifdef VMS
  1759. X!     extern FILE *yyin, *yyout;
  1760. X!     yyin = stdin,  yyout = stdout;
  1761. X  # endif
  1762. X  #endif
  1763. X  
  1764. X***************
  1765. X*** 101,107 ****
  1766. X          yyparse();
  1767. X      else             /* Otherwise every argument is a filename */
  1768. X          for(i=1; i<argc; i++) {
  1769. X! #if defined(VMS) || defined(AZTEC_C)
  1770. X              extern FILE *yyin;
  1771. X              yyin = fin = fopen(argv[i], "r");
  1772. X  #else
  1773. X--- 121,131 ----
  1774. X          yyparse();
  1775. X      else             /* Otherwise every argument is a filename */
  1776. X          for(i=1; i<argc; i++) {
  1777. X! #ifdef MACOS
  1778. X!                     argv[i] = descrip[i];
  1779. X!                     fprintf(stdout, "Working on %s\n", argv[i]);
  1780. X! #endif
  1781. X! #if defined(AZTEC_C)
  1782. X              extern FILE *yyin;
  1783. X              yyin = fin = fopen(argv[i], "r");
  1784. X  #else
  1785. X***************
  1786. X*** 115,121 ****
  1787. X--- 139,149 ----
  1788. X              line_number = 1;
  1789. X              fatal_error = 0;
  1790. X          }
  1791. X+ #ifndef VMS
  1792. X      return 0;
  1793. X+ #else
  1794. X+     return 1;       /* vms success */
  1795. X+ #endif /*VMS*/
  1796. X  }
  1797. X  
  1798. X  /* 
  1799. X*** src/Old/lock.c    Sun Jun  3 13:03:34 1990
  1800. X--- src/lock.c    Thu May 31 22:10:57 1990
  1801. X***************
  1802. X*** 4,30 ****
  1803. X  
  1804. X  #include    "hack.h"
  1805. X  
  1806. X! #ifndef OVERLAY
  1807. X! static int NDECL(picklock);
  1808. X! static int NDECL(forcelock);
  1809. X! #else
  1810. X! int NDECL(picklock);
  1811. X! int NDECL(forcelock);
  1812. X! #endif
  1813. X! static boolean FDECL(obstructed,(int,int));
  1814. X  
  1815. X! VSTATIC struct xlock_s {
  1816. X      int    door_or_box, picktyp;
  1817. X      struct rm  *door;
  1818. X      struct obj *box;
  1819. X      int chance, usedtime;
  1820. X! } xlock;
  1821. X  
  1822. X  #ifdef OVLB
  1823. X  
  1824. X! #ifndef OVERLAY
  1825. X! static
  1826. X! #endif
  1827. X  int
  1828. X  picklock() {    /* try to open/close a lock */
  1829. X  
  1830. X--- 4,24 ----
  1831. X  
  1832. X  #include    "hack.h"
  1833. X  
  1834. X! STATIC_PTR int NDECL(picklock);
  1835. X! STATIC_PTR int NDECL(forcelock);
  1836. X  
  1837. X! STATIC_VAR struct xlock_s {
  1838. X      int    door_or_box, picktyp;
  1839. X      struct rm  *door;
  1840. X      struct obj *box;
  1841. X      int chance, usedtime;
  1842. X! } NEARDATA xlock;
  1843. X  
  1844. X  #ifdef OVLB
  1845. X  
  1846. X! static boolean FDECL(obstructed,(int,int));
  1847. X! 
  1848. X! STATIC_PTR
  1849. X  int
  1850. X  picklock() {    /* try to open/close a lock */
  1851. X  
  1852. X***************
  1853. X*** 87,95 ****
  1854. X      return((xlock.usedtime = 0));
  1855. X  }
  1856. X  
  1857. X! #ifndef OVERLAY
  1858. X! static 
  1859. X! #endif
  1860. X  int
  1861. X  forcelock() {    /* try to force a locked chest */
  1862. X  
  1863. X--- 81,87 ----
  1864. X      return((xlock.usedtime = 0));
  1865. X  }
  1866. X  
  1867. X! STATIC_PTR
  1868. X  int
  1869. X  forcelock() {    /* try to force a locked chest */
  1870. X  
  1871. X***************
  1872. X*** 252,258 ****
  1873. X          struct monst *mtmp;
  1874. X  
  1875. X          door = &levl[x][y];
  1876. X!         if (MON_AT(x, y) && canseemon(mtmp = m_at(x,y)) && !mtmp->mimic) {
  1877. X          if (picktyp == CREDIT_CARD &&
  1878. X  #ifdef ORACLE
  1879. X              (mtmp->isshk || mtmp->data == &mons[PM_ORACLE]))
  1880. X--- 244,250 ----
  1881. X          struct monst *mtmp;
  1882. X  
  1883. X          door = &levl[x][y];
  1884. X!         if ((mtmp = m_at(x,y)) && canseemon(mtmp) && !mtmp->mimic) {
  1885. X          if (picktyp == CREDIT_CARD &&
  1886. X  #ifdef ORACLE
  1887. X              (mtmp->isshk || mtmp->data == &mons[PM_ORACLE]))
  1888. X***************
  1889. X*** 395,401 ****
  1890. X      y = u.uy + u.dy;
  1891. X      if((x == u.ux) && (y == u.uy)) return(0);
  1892. X  
  1893. X!     if(MON_AT(x, y) && (mtmp = m_at(x,y))->mimic &&
  1894. X                  mtmp->m_ap_type == M_AP_FURNITURE &&
  1895. X                  mtmp->mappearance == S_cdoor &&
  1896. X                  !Protection_from_shape_changers) {
  1897. X--- 387,393 ----
  1898. X      y = u.uy + u.dy;
  1899. X      if((x == u.ux) && (y == u.uy)) return(0);
  1900. X  
  1901. X!     if((mtmp = m_at(x,y)) && mtmp->mimic &&
  1902. X                  mtmp->m_ap_type == M_AP_FURNITURE &&
  1903. X                  mtmp->mappearance == S_cdoor &&
  1904. X                  !Protection_from_shape_changers) {
  1905. X***************
  1906. X*** 484,490 ****
  1907. X          return(1);
  1908. X      }
  1909. X  
  1910. X!     if(MON_AT(x, y) && (mtmp = m_at(x,y))->mimic &&
  1911. X                  mtmp->m_ap_type == M_AP_FURNITURE && 
  1912. X                  mtmp->mappearance == S_cdoor &&
  1913. X                  !Protection_from_shape_changers) {
  1914. X--- 476,482 ----
  1915. X          return(1);
  1916. X      }
  1917. X  
  1918. X!     if((mtmp = m_at(x,y)) && mtmp->mimic &&
  1919. X                  mtmp->m_ap_type == M_AP_FURNITURE && 
  1920. X                  mtmp->mappearance == S_cdoor &&
  1921. X                  !Protection_from_shape_changers) {
  1922. X***************
  1923. X*** 702,708 ****
  1924. X  
  1925. X  int
  1926. X  bimanual(otmp) struct obj * otmp; {
  1927. X!     return(otmp->olet == WEAPON_SYM && objects[otmp->otyp].oc_bimanual);
  1928. X  }
  1929. X  #endif /* STUPID_CPP */
  1930. X  
  1931. X--- 694,701 ----
  1932. X  
  1933. X  int
  1934. X  bimanual(otmp) struct obj * otmp; {
  1935. X!     return((otmp->olet == WEAPON_SYM || otmp->otyp == UNICORN_HORN)
  1936. X!         && objects[otmp->otyp].oc_bimanual);
  1937. X  }
  1938. X  #endif /* STUPID_CPP */
  1939. X  
  1940. X*** src/Old/mail.c    Sun Jun  3 13:28:46 1990
  1941. X--- src/mail.c    Tue May  8 19:16:30 1990
  1942. X***************
  1943. X*** 120,126 ****
  1944. X  
  1945. X  # ifdef VMS
  1946. X  extern unsigned long pasteboard_id;
  1947. X! int broadcasts = 0;
  1948. X  #  define getmailstatus()
  1949. X  # endif /* VMS */
  1950. X  
  1951. X--- 120,126 ----
  1952. X  
  1953. X  # ifdef VMS
  1954. X  extern unsigned long pasteboard_id;
  1955. X! volatile int broadcasts = 0;
  1956. X  #  define getmailstatus()
  1957. X  # endif /* VMS */
  1958. X  
  1959. X***************
  1960. X*** 150,156 ****
  1961. X          /* find location next to (fx,fy) closest to (tx,ty) */
  1962. X          d1 = dist2(fx,fy,tx,ty);
  1963. X          for(dx = -1; dx <= 1; dx++) for(dy = -1; dy <= 1; dy++)
  1964. X!             if((dx || dy) && 
  1965. X                 !IS_STWALL(levl[fx+dx][fy+dy].typ)) {
  1966. X              d2 = dist2(fx+dx,fy+dy,tx,ty);
  1967. X              if(d2 < d1) {
  1968. X--- 150,156 ----
  1969. X          /* find location next to (fx,fy) closest to (tx,ty) */
  1970. X          d1 = dist2(fx,fy,tx,ty);
  1971. X          for(dx = -1; dx <= 1; dx++) for(dy = -1; dy <= 1; dy++)
  1972. X!             if((dx || dy) && isok(fx+dx,fy+dy) && 
  1973. X                 !IS_STWALL(levl[fx+dx][fy+dy].typ)) {
  1974. X              d2 = dist2(fx+dx,fy+dy,tx,ty);
  1975. X              if(d2 < d1) {
  1976. X***************
  1977. X*** 229,238 ****
  1978. X  newmail() {
  1979. X      /* deliver a scroll of mail */
  1980. X      register boolean invload =
  1981. X!     ((inv_weight() + (int)objects[SCR_MAIL].oc_weight) > 0 ||
  1982. X!      inv_cnt() >= 52 || Fumbling);
  1983. X!     register struct monst *md = 
  1984. X!     makemon(&mons[PM_MAIL_DAEMON], u.ux, u.uy);
  1985. X  
  1986. X      if(!md)    return;
  1987. X  
  1988. X--- 229,237 ----
  1989. X  newmail() {
  1990. X      /* deliver a scroll of mail */
  1991. X      register boolean invload =
  1992. X!         ((inv_weight() + (int)objects[SCR_MAIL].oc_weight) > 0 ||
  1993. X!              inv_cnt() >= 52 || Fumbling);
  1994. X!     register struct monst *md = makemon(&mons[PM_MAIL_DAEMON], u.ux, u.uy);
  1995. X  
  1996. X      if(!md)    return;
  1997. X  
  1998. X***************
  1999. X*** 262,267 ****
  2000. X--- 261,267 ----
  2001. X          /* set known and do prinv() */
  2002. X          (void) identify(addinv(mksobj(SCR_MAIL,FALSE)));
  2003. X      }
  2004. X+ # endif /* NO_MAILREADER */
  2005. X  
  2006. X      /* disappear again */
  2007. X      mdappear(md,TRUE);
  2008. X***************
  2009. X*** 272,278 ****
  2010. X  # ifdef VMS
  2011. X      broadcasts--;
  2012. X  # endif
  2013. X- # endif /* NO_MAILREADER */
  2014. X  }
  2015. X  
  2016. X  #endif /* OVLB */
  2017. X--- 272,277 ----
  2018. X*** src/Old/makedefs.c    Sun Jun  3 13:29:07 1990
  2019. X--- src/makedefs.c    Mon May 28 09:38:30 1990
  2020. X***************
  2021. X*** 3,17 ****
  2022. X  /* makedefs.c - NetHack version 3.0 */
  2023. X  
  2024. X  
  2025. X- #define EXTERN_H
  2026. X  #include    "config.h"
  2027. X  #include    "permonst.h"
  2028. X  #include    "objclass.h"
  2029. X  #ifdef NULL
  2030. X  #undef NULL
  2031. X  #endif /* NULL */
  2032. X  #define NULL    ((genericptr_t)0)
  2033. X  
  2034. X  #if !defined(LINT) && !defined(__GNULINT__)
  2035. X  static    const char    SCCS_Id[] = "@(#)makedefs.c\t3.0\t89/11/15";
  2036. X  #endif
  2037. X--- 3,23 ----
  2038. X  /* makedefs.c - NetHack version 3.0 */
  2039. X  
  2040. X  
  2041. X  #include    "config.h"
  2042. X  #include    "permonst.h"
  2043. X  #include    "objclass.h"
  2044. X+ #ifdef MACOS
  2045. X+ #include "patchlevel.h"
  2046. X+ #endif
  2047. X  #ifdef NULL
  2048. X  #undef NULL
  2049. X  #endif /* NULL */
  2050. X  #define NULL    ((genericptr_t)0)
  2051. X  
  2052. X+ #if defined(VMS) && defined(__GNUC__)
  2053. X+     char *FDECL(ctime, (time_t *));
  2054. X+ #endif
  2055. X+ 
  2056. X  #if !defined(LINT) && !defined(__GNULINT__)
  2057. X  static    const char    SCCS_Id[] = "@(#)makedefs.c\t3.0\t89/11/15";
  2058. X  #endif
  2059. X***************
  2060. X*** 26,33 ****
  2061. X  # define RDMODE    "r"
  2062. X  # define WRMODE    "w"
  2063. X  #else
  2064. X! # define RDMODE  "r+"
  2065. X! # define WRMODE  "w+"
  2066. X  #endif
  2067. X  
  2068. X  #ifdef MACOS
  2069. X--- 32,44 ----
  2070. X  # define RDMODE    "r"
  2071. X  # define WRMODE    "w"
  2072. X  #else
  2073. X! # ifdef VMS
  2074. X! #  define RDMODE  "r"
  2075. X! #  define WRMODE  "w"
  2076. X! # else
  2077. X! #  define RDMODE  "r+"
  2078. X! #  define WRMODE  "w+"
  2079. X! # endif
  2080. X  #endif
  2081. X  
  2082. X  #ifdef MACOS
  2083. X***************
  2084. X*** 101,110 ****
  2085. X  void NDECL(save_resource);
  2086. X  #endif
  2087. X  
  2088. X! char *FDECL(limit, (char *,BOOLEAN_P));
  2089. X  
  2090. X  #if defined(SMALLDATA) && defined(MACOS)
  2091. X! OSErr FDECL(write_resource, (Handle, short, Str255, short));
  2092. X  # if defined(AZTEC) || defined(THINKC4)
  2093. X  int NDECL(getpid);
  2094. X  # endif
  2095. X--- 112,121 ----
  2096. X  void NDECL(save_resource);
  2097. X  #endif
  2098. X  
  2099. X! char *FDECL(limit, (char *,int));
  2100. X  
  2101. X  #if defined(SMALLDATA) && defined(MACOS)
  2102. X! OSErr FDECL(write_resource, (Handle, ResType, short, Str255, short));
  2103. X  # if defined(AZTEC) || defined(THINKC4)
  2104. X  int NDECL(getpid);
  2105. X  # endif
  2106. X***************
  2107. X*** 220,226 ****
  2108. X      (void) fflush(stderr);
  2109. X      exit(1);
  2110. X  /*NOTREACHED*/
  2111. X! #ifdef MSDOS
  2112. X      return 0;
  2113. X  #endif
  2114. X  }
  2115. X--- 231,237 ----
  2116. X      (void) fflush(stderr);
  2117. X      exit(1);
  2118. X  /*NOTREACHED*/
  2119. X! #if defined(MSDOS) || defined(__GNULINT__)
  2120. X      return 0;
  2121. X  #endif
  2122. X  }
  2123. X***************
  2124. X*** 235,240 ****
  2125. X--- 246,255 ----
  2126. X  #else
  2127. X      Sprintf(tempfile, "makedefs.%d", getpid());
  2128. X  #endif
  2129. X+ /* an ugly hack to limit pid-extension to 3 digits */
  2130. X+ #ifdef OS2
  2131. X+     if (strlen(tempfile) > 12) tempfile[12] = '\0';
  2132. X+ #endif
  2133. X      if(freopen(tempfile, WRMODE, stdout) == (FILE *)0) {
  2134. X          perror(tempfile);
  2135. X          exit(1);
  2136. X***************
  2137. X*** 313,319 ****
  2138. X      (void) fclose(stdin);
  2139. X      (void) fclose(stdout);
  2140. X  #ifdef MACOS
  2141. X!     strcpy((char *)File, RUMOR_FILE);
  2142. X      CtoPstr((char *)File);
  2143. X      if(!GetVol(VolName, &vRef) && !GetFInfo(File, vRef, &info)){
  2144. X          info.fdCreator = CREATOR;
  2145. X--- 328,334 ----
  2146. X      (void) fclose(stdin);
  2147. X      (void) fclose(stdout);
  2148. X  #ifdef MACOS
  2149. X!     Strcpy((char *)File, RUMOR_FILE);
  2150. X      CtoPstr((char *)File);
  2151. X      if(!GetVol(VolName, &vRef) && !GetFInfo(File, vRef, &info)){
  2152. X          info.fdCreator = CREATOR;
  2153. X***************
  2154. X*** 363,369 ****
  2155. X  #ifndef INFERNO
  2156. X      boolean    skipping_demons = TRUE;
  2157. X  #endif
  2158. X!     Sprintf(tempfile, "%s.base", DATA_FILE);
  2159. X      if(freopen(tempfile, RDMODE, stdin) == (FILE *)0) {
  2160. X          perror(tempfile);
  2161. X          exit(1);
  2162. X--- 378,390 ----
  2163. X  #ifndef INFERNO
  2164. X      boolean    skipping_demons = TRUE;
  2165. X  #endif
  2166. X!     Sprintf(tempfile,
  2167. X! #ifdef OS2
  2168. X!         "%s.bas",
  2169. X! #else
  2170. X!         "%s.base",
  2171. X! #endif
  2172. X!         DATA_FILE);
  2173. X      if(freopen(tempfile, RDMODE, stdin) == (FILE *)0) {
  2174. X          perror(tempfile);
  2175. X          exit(1);
  2176. X***************
  2177. X*** 472,478 ****
  2178. X  char *
  2179. X  limit(name,pref)    /* limit a name to 30 characters length */
  2180. X  char    *name;
  2181. X! boolean    pref;
  2182. X  {
  2183. X      (void) strncpy(temp, name, pref ? 26 : 30);
  2184. X      temp[pref ? 26 : 30] = 0;
  2185. X--- 493,499 ----
  2186. X  char *
  2187. X  limit(name,pref)    /* limit a name to 30 characters length */
  2188. X  char    *name;
  2189. X! int    pref;
  2190. X  {
  2191. X      (void) strncpy(temp, name, pref ? 26 : 30);
  2192. X      temp[pref ? 26 : 30] = 0;
  2193. X***************
  2194. X*** 487,493 ****
  2195. X  #ifdef SPELLS
  2196. X      int nspell = 0;
  2197. X  #endif
  2198. X!     boolean prefix = 0;
  2199. X      char let = '\0';
  2200. X      boolean    sumerr = FALSE;
  2201. X  
  2202. X--- 508,514 ----
  2203. X  #ifdef SPELLS
  2204. X      int nspell = 0;
  2205. X  #endif
  2206. X!     int prefix = 0;
  2207. X      char let = '\0';
  2208. X      boolean    sumerr = FALSE;
  2209. X  
  2210. X***************
  2211. X*** 536,551 ****
  2212. X              if(objects[i].oc_material == GLASS) {
  2213. X                  Printf("/* #define\t%s\t%d */\n",
  2214. X                              objnam, i);
  2215. X!                 continue;
  2216. X              }
  2217. X              default:
  2218. X              Printf("#define\t");
  2219. X          }
  2220. X!         Printf("%s\t%d\n", limit(objnam, prefix), i);
  2221. X          prefix = 0;
  2222. X  
  2223. X          sum += objects[i].oc_prob;
  2224. X      }
  2225. X      Printf("#define\tLAST_GEM\t(JADE+1)\n");
  2226. X  #ifdef SPELLS
  2227. X      Printf("#define\tMAXSPELL\t%d\n", nspell+1);
  2228. X--- 557,583 ----
  2229. X              if(objects[i].oc_material == GLASS) {
  2230. X                  Printf("/* #define\t%s\t%d */\n",
  2231. X                              objnam, i);
  2232. X!                 prefix = -1;
  2233. X!                 break;
  2234. X              }
  2235. X              default:
  2236. X              Printf("#define\t");
  2237. X          }
  2238. X!         if (prefix >= 0)
  2239. X!             Printf("%s\t%d\n", limit(objnam, prefix), i);
  2240. X          prefix = 0;
  2241. X  
  2242. X          sum += objects[i].oc_prob;
  2243. X      }
  2244. X+ 
  2245. X+     /* check last set of probabilities */
  2246. X+     if (sum && sum != 1000) {
  2247. X+         (void) fprintf(stderr,
  2248. X+             "prob error for %c (%d%%)", let, sum);
  2249. X+         (void) fflush(stderr);
  2250. X+         sumerr = TRUE;
  2251. X+     }
  2252. X+ 
  2253. X      Printf("#define\tLAST_GEM\t(JADE+1)\n");
  2254. X  #ifdef SPELLS
  2255. X      Printf("#define\tMAXSPELL\t%d\n", nspell+1);
  2256. X***************
  2257. X*** 622,629 ****
  2258. X  void
  2259. X  do_monst()
  2260. X  {
  2261. X!     Handle    monstData, objData;
  2262. X!     short i,j;
  2263. X      pmstr    *pmMonst;
  2264. X      SFReply    reply;
  2265. X      short    refNum,error;
  2266. X--- 654,662 ----
  2267. X  void
  2268. X  do_monst()
  2269. X  {
  2270. X!     Handle    monstData, objData, versData;
  2271. X!     char versStr[32], *vstr = VERSION;
  2272. X!     short i, j, patlev = PATCHLEVEL;
  2273. X      pmstr    *pmMonst;
  2274. X      SFReply    reply;
  2275. X      short    refNum,error;
  2276. X***************
  2277. X*** 655,677 ****
  2278. X      }
  2279. X      PtrToHand((Ptr)objects, &objData, ((i+1)*sizeof(struct objclass)));
  2280. X  
  2281. X!     strcpy((char *)&name[0], "\010NH3.rsrc");
  2282. X      if (findNamedFile(&name[1], 0, &reply)) {
  2283. X!         strncpy((char *)&name[0],(char *)&reply.fName[0], reply.fName[0]+1);
  2284. X          if ((refNum = OpenResFile(name)) != -1) {
  2285. X          if (ResError() == noErr) {
  2286. X!             strcpy((char *)&name[0], "\012MONST_DATA");
  2287. X!             if (error = write_resource(monstData,
  2288. X                          MONST_DATA, name, refNum)) {
  2289. X              SysBeep(1);
  2290. X              Printf("Couldn't add monster data resource.\n");
  2291. X              }
  2292. X!             strcpy((char *)&name[0], "\013OBJECT_DATA");
  2293. X!             if (error = write_resource(objData,
  2294. X                          OBJECT_DATA, name, refNum)) {
  2295. X              SysBeep(1);
  2296. X              Printf("Couldn't add object data resource.\n");
  2297. X              }
  2298. X              CloseResFile(refNum);
  2299. X              if (ResError() != noErr) {
  2300. X              SysBeep(1);
  2301. X--- 688,721 ----
  2302. X      }
  2303. X      PtrToHand((Ptr)objects, &objData, ((i+1)*sizeof(struct objclass)));
  2304. X  
  2305. X!     /* place a small string in the creator resource to identify version */
  2306. X!     Sprintf(versStr, "n%s patchlevel%2d", vstr, patlev);
  2307. X!     *versStr = (int)strlen(VERSION) + 13;  /* n = actual string length */
  2308. X!     PtrToHand(versStr, &versData, sizeof(versStr));
  2309. X! 
  2310. X!     Strcpy((char *)&name[0], "\021nethack.proj.rsrc");
  2311. X      if (findNamedFile(&name[1], 0, &reply)) {
  2312. X!         (void)strncpy((char *)&name[0],(char *)&reply.fName[0], reply.fName[0]+1);
  2313. X          if ((refNum = OpenResFile(name)) != -1) {
  2314. X          if (ResError() == noErr) {
  2315. X!             Strcpy((char *)&name[0], "\012MONST_DATA");
  2316. X!             if (error = write_resource(monstData, HACK_DATA,
  2317. X                          MONST_DATA, name, refNum)) {
  2318. X              SysBeep(1);
  2319. X              Printf("Couldn't add monster data resource.\n");
  2320. X              }
  2321. X!             Strcpy((char *)&name[0], "\013OBJECT_DATA");
  2322. X!             if (error = write_resource(objData, HACK_DATA,
  2323. X                          OBJECT_DATA, name, refNum)) {
  2324. X              SysBeep(1);
  2325. X              Printf("Couldn't add object data resource.\n");
  2326. X              }
  2327. X+             Strcpy((char *)&name[0], "\000");
  2328. X+             if (error = write_resource(versData, CREATOR,
  2329. X+                         0, name, refNum)) {
  2330. X+             SysBeep(1);
  2331. X+             Printf("Couldn't add creator info resource.\n");
  2332. X+             }
  2333. X              CloseResFile(refNum);
  2334. X              if (ResError() != noErr) {
  2335. X              SysBeep(1);
  2336. X***************
  2337. X*** 735,752 ****
  2338. X  
  2339. X  
  2340. X  OSErr
  2341. X! write_resource(data, resID, resName, refNum)
  2342. X  Handle    data;
  2343. X  short    resID;
  2344. X  Str255    resName;
  2345. X  short    refNum;
  2346. X  {
  2347. X-     ResType    theType;
  2348. X      short    error;
  2349. X      Handle    theRes;
  2350. X  
  2351. X-     theType = HACK_DATA;
  2352. X-     error = CurResFile();
  2353. X      if (theRes = GetResource(theType, resID)) {
  2354. X          RmveResource(theRes);
  2355. X          error = ResError();
  2356. X--- 779,794 ----
  2357. X  
  2358. X  
  2359. X  OSErr
  2360. X! write_resource(data, theType, resID, resName, refNum)
  2361. X  Handle    data;
  2362. X+ ResType    theType;
  2363. X  short    resID;
  2364. X  Str255    resName;
  2365. X  short    refNum;
  2366. X  {
  2367. X      short    error;
  2368. X      Handle    theRes;
  2369. X  
  2370. X      if (theRes = GetResource(theType, resID)) {
  2371. X          RmveResource(theRes);
  2372. X          error = ResError();
  2373. X
  2374. END_OF_FILE
  2375. if test 50662 -ne `wc -c <'patch8.03'`; then
  2376.     echo shar: \"'patch8.03'\" unpacked with wrong size!
  2377. fi
  2378. # end of 'patch8.03'
  2379. fi
  2380. echo shar: End of archive 9 \(of 24\).
  2381. cp /dev/null ark9isdone
  2382. MISSING=""
  2383. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ; do
  2384.     if test ! -f ark${I}isdone ; then
  2385.     MISSING="${MISSING} ${I}"
  2386.     fi
  2387. done
  2388. if test "${MISSING}" = "" ; then
  2389.     echo You have unpacked all 24 archives.
  2390.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2391. else
  2392.     echo You still need to unpack the following archives:
  2393.     echo "        " ${MISSING}
  2394. fi
  2395. ##  End of shell archive.
  2396. exit 0
  2397.